package cn.pink.core.support;


import com.fasterxml.jackson.databind.ObjectMapper;

public class JSONUtils {
    private static ThreadLocal<ObjectMapper> jacksonMapper = new ThreadLocal<>();


    public static ObjectMapper getJacksonMapper(){
        ObjectMapper mapper = jacksonMapper.get();
        if (mapper == null){
            mapper = new ObjectMapper();
            jacksonMapper.set(mapper);
        }
        return mapper;
    }
}
